package marketing

import (
	"jlpay-sdk-go/pkg/jlpay/core"
	"jlpay-sdk-go/pkg/jlpay/models/marketing"
	"jlpay-sdk-go/pkg/jlpay/services"
)

// MerchantActivityUpdateService 商户活动更新服务
type MerchantActivityUpdateService struct {
	*services.BaseService
}

// NewMerchantActivityUpdateService 创建新的商户活动更新服务
func NewMerchantActivityUpdateService(config *core.Config) *MerchantActivityUpdateService {
	return &MerchantActivityUpdateService{
		BaseService: services.NewBaseService(config),
	}
}

// Execute 执行商户活动更新请求
func (s *MerchantActivityUpdateService) Execute(request *marketing.MerchantActivityUpdateRequest) (*marketing.MerchantActivityUpdateResponse, error) {
	response := marketing.NewMerchantActivityUpdateResponse()
	err := s.Post(request, response, "/open/org/bank/act-bridge/act-merch-relation/update")
	if err != nil {
		return nil, err
	}
	return response, nil
}
